﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="BMI.aspx.vb" Inherits="WebApplication1.BMI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p></br>
        <asp:Label ID="Label1" runat="server" Text="Enter your Height in Meters"></asp:Label>
        <asp:TextBox ID="txtHeight" runat="server"></asp:TextBox>
        <asp:RangeValidator ID="RangeValidator1" runat="server" 
            ControlToValidate="txtHeight" CssClass="errorMessage" 
            ErrorMessage="Enter only a decimal value" MaximumValue="5.0" MinimumValue="0.1" 
            Type="Double"></asp:RangeValidator>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="txtHeight" ErrorMessage="Please enter a value"></asp:RequiredFieldValidator>
        <br />
    </p>
    <p>
        <asp:Label ID="Label2" runat="server" Text="Enter your weight in Kg"></asp:Label>
        <asp:TextBox ID="txtWeight" runat="server"></asp:TextBox>
        <asp:RangeValidator ID="RangeValidator2" runat="server" 
            ControlToValidate="txtWeight" CssClass="errorMessage" 
            ErrorMessage="Enter only a decimal value" MaximumValue="300" MinimumValue="1" 
            Type="Double"></asp:RangeValidator>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="txtWeight" ErrorMessage="Please enter a value"></asp:RequiredFieldValidator>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Calculate your BMI" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </p>
    <p>
        <asp:Label ID="lblBMI" runat="server"></asp:Label>
    </p>
</asp:Content>
